﻿#region Apache Notice
/*****************************************************************************
 * $Header: $
 * $Revision: 591621 $
 * $Date: 2009-06-28 10:11:37 -0600 (Sun, 28 Jun 2009) $
 * 
 * iBATIS.NET Data Mapper
 * Copyright (C) 2008/2005 - The Apache Software Foundation
 *  
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 ********************************************************************************/
#endregion


namespace MyBatis.DataMapper.Configuration.Interpreters.Config
{
    ///<summary>
    /// Constants for nodes and attributes name in iBATIS configuration
    /// </summary>
    public static class ConfigConstants
    {
        /// <summary>
        /// Token for SqlMapConfig xml root element.
        /// </summary>
        public const string ELEMENT_DATAMAPPER_CONFIG_ROOT = "sqlMapConfig";

        public const string DATAMAPPER_NAMESPACE_PREFIX = "mapper";
        public const string PROVIDERS_NAMESPACE_PREFIX = "provider";
        public const string MAPPING_NAMESPACE_PREFIX = "mapping";

        public const string DATAMAPPER_XML_NAMESPACE = "http://ibatis.apache.org/dataMapper";
        public const string PROVIDER_XML_NAMESPACE = "http://ibatis.apache.org/providers";
        public const string MAPPING_XML_NAMESPACE = "http://ibatis.apache.org/mapping";

        /// <summary>
        /// Dot representation.
        /// </summary>
        public const string DOT = ".";

        #region Token attribute

        /// <summary>
        /// Token for attribute preserveWhitespace
        /// </summary>
        public const string ATTRIBUTE_PRESERVEWHITSPACE = "preserveWhitespace";

        /// <summary>
        /// Token for attribute sqlSource
        /// </summary>
        public const string ATTRIBUTE_SQLSOURCE = "sqlSource";
        /// <summary>
        /// Token for attribute keyColumns.
        /// </summary>
        public const string ATTRIBUTE_SUFFIX = "suffix";
        /// <summary>
        /// Token for attribute keyColumns.
        /// </summary>
        public const string ATTRIBUTE_PREFIX = "prefix";
        /// <summary>
        /// Token for attribute keyColumns.
        /// </summary>
        public const string ATTRIBUTE_KEYS_PROPERTIES = "keys";
        /// <summary>
        /// Token for attribute scale.
        /// </summary>
        public const string ATTRIBUTE_SCALE = "scale";
        /// <summary>
        /// Token for attribute size.
        /// </summary>
        public const string ATTRIBUTE_SIZE = "size";
        /// <summary>
        /// Token for attribute precision.
        /// </summary>
        public const string ATTRIBUTE_PRECISION = "precision";
        /// <summary>
        /// Token for attribute direction.
        /// </summary>
        public const string ATTRIBUTE_DIRECTION = "direction";
        /// <summary>
        /// Token for attribute prepend.
        /// </summary>
        public const string ATTRIBUTE_PREPEND = "prepend";
        /// <summary>
        /// Token for attribute remapResults.
        /// </summary>
        public const string ATTRIBUTE_REMAPRESULTS = "remapResults";
        /// <summary>
        /// Token for attribute resultMap.
        /// </summary>
        public const string ATTRIBUTE_RESULTMAP = "resultMap";
        /// <summary>
        /// Token for attribute resultClass.
        /// </summary>
        public const string ATTRIBUTE_RESULTCLASS = "resultClass";
        /// <summary>
        /// Token for attribute parameterMap.
        /// </summary>
        public const string ATTRIBUTE_PARAMETERMAP = "parameterMap";
        /// <summary>
        /// Token for attribute parameterClass.
        /// </summary>
        public const string ATTRIBUTE_PARAMETERCLASS = "parameterClass";
        /// <summary>
        /// Token for attribute listClass.
        /// </summary>
        public const string ATTRIBUTE_LISTCLASS = "listClass";
        /// <summary>
        /// Token for attribute cacheModel.
        /// </summary>
        public const string ATTRIBUTE_CACHEMODEL = "cacheModel";
        /// <summary>
        /// Token for attribute serialize.
        /// </summary>
        public const string ATTRIBUTE_SERIALIZE = "serialize";
        /// <summary>
        /// Token for attribute readOnly.
        /// </summary>
        public const string ATTRIBUTE_READONLY = "readOnly";
        /// <summary>
        /// Token for attribute refid.
        /// </summary>
        public const string ATTRIBUTE_REFID = "refid";
        /// <summary>
        /// Token for attribute name.
        /// </summary>
        public const string ATTRIBUTE_NAME= "name";
        /// <summary>
        /// Token for attribute uri.
        /// </summary>
        public const string ATTRIBUTE_URI = "uri";
        /// <summary>
        /// Token for attribute key of property element.
        /// </summary>
        public const string ATTRIBUTE_KEY = "key";
        /// <summary>
        /// Token for attribute value of property element.
        /// </summary>
        public const string ATTRIBUTE_VALUE = "value";
        /// <summary>
        /// Token for attribute alias.
        /// </summary>
        public const string ATTRIBUTE_ALIAS = "alias";
        /// <summary>
        /// Token for attribute type.
        /// </summary>
        public const string ATTRIBUTE_TYPE = "type";
        /// <summary>
        /// Token for attribute dbType.
        /// </summary>
        public const string ATTRIBUTE_DBTYPE = "dbType";
        /// <summary>
        /// Token for attribute callback.
        /// </summary>
        public const string ATTRIBUTE_CALLBACK = "callback";
        /// <summary>
        /// Token for attribute id.
        /// </summary>
        public const string ATTRIBUTE_ID = "id";
        /// <summary>
        /// Token for attribute implementation.
        /// </summary>
        public const string ATTRIBUTE_IMPLEMENTATION = "implementation";
        /// <summary>
        /// Token for attribute milliseconds.
        /// </summary>
        public const string ATTRIBUTE_MILLISECONDS = "milliseconds";
        /// <summary>
        /// Token for attribute seconds.
        /// </summary>
        public const string ATTRIBUTE_SECONDS = "seconds";
        /// <summary>
        /// Token for attribute minutes.
        /// </summary>
        public const string ATTRIBUTE_MINUTES = "minutes";
        /// <summary>
        /// Token for attribute hours.
        /// </summary>
        public const string ATTRIBUTE_HOURS = "hours";
        /// <summary>
        /// Token for attribute statement.
        /// </summary>
        public const string ATTRIBUTE_STATEMENT = "statement";
        /// <summary>
        /// Token for attribute class.
        /// </summary>
        public const string ATTRIBUTE_CLASS = "class";
        /// <summary>
        /// Token for attribute groupBy.
        /// </summary>
        public const string ATTRIBUTE_GROUPBY = "groupBy";
        /// <summary>
        /// Token for attribute extends.
        /// </summary>
        public const string ATTRIBUTE_EXTENDS = "extends";
        /// <summary>
        /// Token for attribute property.
        /// </summary>
        public const string ATTRIBUTE_PROPERTY = "property";
        /// <summary>
        /// Token for attribute column.
        /// </summary>
        public const string ATTRIBUTE_COLUMN = "column";
        /// <summary>
        /// Token for attribute lazyLoad.
        /// </summary>
        public const string ATTRIBUTE_LAZYLOAD = "lazyLoad";
        /// <summary>
        /// Token for attribute select.
        /// </summary>
        public const string ATTRIBUTE_SELECT = "select";
        /// <summary>
        /// Token for attribute nullValue.
        /// </summary>
        public const string ATTRIBUTE_NULLVALUE = "nullValue";
        /// <summary>
        /// Token for attribute columnIndex.
        /// </summary>
        public const string ATTRIBUTE_COLUMNINDEX = "columnIndex";
        /// <summary>
        /// Token for attribute resultMapping.
        /// </summary>
        public const string ATTRIBUTE_RESULTMAPPING = "resultMapping";
        /// <summary>
        /// Token for attribute typeHandler.
        /// </summary>
        public const string ATTRIBUTE_TYPEHANDLER = "typeHandler";
        /// <summary>
        /// Token for attribute argumentName.
        /// </summary>
        public const string ATTRIBUTE_ARGUMENTNAME = "argumentName";
        /// <summary>
        /// Token for attribute namespace.
        /// </summary>
        public const string ATTRIBUTE_NAMESPACE = "namespace";
        /// <summary>
        /// Token for attribute useStatementNamespaces.
        /// </summary>
        public const string ATTRIBUTE_USE_STATEMENT_NAMESPACES = "useStatementNamespaces";
        /// <summary>
        /// Token for attribute cacheModelsEnabled.
        /// </summary>
        public const string ATTRIBUTE_CACHE_MODELS_ENABLED = "cacheModelsEnabled";
        /// <summary>
        /// Token for attribute useReflectionOptimizer.
        /// </summary>
        public const string ATTRIBUTE_USE_REFLECTION_OPTIMIZER = "useReflectionOptimizer";
        /// <summary>
        /// Token for attribute validateSqlMap.
        /// </summary>
        public const string ATTRIBUTE_VALIDATE_SQLMAP = "validateSqlMap";
        /// <summary>
        /// Token for attribute command.timeout.
        /// </summary>
        public const string ATTRIBUTE_COMMAND_TIMEOUT = "commandTimeout";
        /// <summary>
        /// Token for attribute flushInterval.
        /// </summary>
        public const string ATTRIBUTE_FLUSHINTERVAL = "flushInterval";
        /// <summary>
        /// Token for attribute share.
        /// </summary>
        public const string ATTRIBUTE_SHARE = "share";
 
        #endregion

        #region Token element

        /// <summary>
        /// Token to preserve whitespace in statements.
        /// </summary>
        public const string ELEMENT_PRESERVEWHITESPACE = "preserveWhitespace";
        /// <summary>
        /// Token to identify the empty parameter map.
        /// </summary>
        public const string EMPTY_PARAMETER_MAP = "iBATIS.Empty.ParameterMap";
        /// <summary>
        /// Token for xml path to setting elements.
        /// </summary>
        public const string ELEMENT_SETTING = "setting";
        /// <summary>
        /// Token for xml path to properties element.
        /// </summary>
        public const string ELEMENT_PROPERTIES = "properties";
        /// <summary>
        /// Token for xml path to property element.
        /// </summary>
        public const string ELEMENT_PROPERTY = "property";
        /// <summary>
        /// Token for xml path to add element.
        /// </summary>
        public const string ELEMENT_ADD = "add";
        /// <summary>
        /// Token for xml path to database element.
        /// </summary>
        public const string ELEMENT_DATABASE = "database";

        /// <summary>
        /// Token for xml path to typeAlias element.
        /// </summary>
        public const string ELEMENT_TYPEALIAS = "typeAlias";
        /// <summary>
        /// Token for xml path to typeHandler element.
        /// </summary>
        public const string ELEMENT_TYPEHANDLER = "typeHandler";
        /// <summary>
        /// Token for xml path to sqlMap element.
        /// </summary>
        public const string ELEMENT_SQLMAP = "sqlMap";
        /// <summary>
        /// Token for xml path to cacheModel element.
        /// </summary>
        public const string ELEMENT_CACHEMODEL = "cacheModel";
        /// <summary>
        /// Token for xml path to flushInterval element.
        /// </summary>
        public const string ELEMENT_FLUSHINTERVAL = "flushInterval";
        /// <summary>
        /// Token for xml path to flushOnExecute element.
        /// </summary>
        public const string ELEMENT_FLUSHONEXECUTE = "flushOnExecute";
        /// <summary>
        /// Token for xml path to resultMap element.
        /// </summary>
        public const string ELEMENT_RESULTMAP = "resultMap";
        /// <summary>
        /// Token for xml path to constructor element.
        /// </summary>
        public const string ELEMENT_CONSTRUCTOR = "constructor";
        /// <summary>
        /// Token for xml path to argument element.
        /// </summary>
        public const string ELEMENT_ARGUMENT = "argument";
        /// <summary>
        /// Token for xml path to result element.
        /// </summary>
        public const string ELEMENT_RESULT = "result";
        /// <summary>
        /// Token for xml path to discriminator element.
        /// </summary>
        public const string ELEMENT_DISCRIMINATOR = "discriminator";
        /// <summary>
        /// Token for xml path to subMap element.
        /// </summary>
        public const string ELEMENT_CASE = "case";
        /// <summary>
        /// Token for xml path to parameterMap element.
        /// </summary>
        public const string ELEMENT_PARAMETERMAP = "parameterMap";
        /// <summary>
        /// Token for xml path to parameter element.
        /// </summary>
        public const string ELEMENT_PARAMETER = "parameter";


        /// <summary>
        /// Token for xml path to select element.
        /// </summary>
        public const string ELEMENT_SELECT = "select";
        /// <summary>
        /// Token for xml path to insert element.
        /// </summary>
        public const string ELEMENT_INSERT = "insert";
        /// <summary>
        /// Token for xml path to update element.
        /// </summary>
        public const string ELEMENT_UPDATE = "update";
        /// <summary>
        /// Token for xml path to delete element.
        /// </summary>
        public const string ELEMENT_DELETE = "delete";
        /// <summary>
        /// Token for xml path to statement element.
        /// </summary>
        public const string ELEMENT_STATEMENT = "statement"; 
        /// <summary>
        /// Token for xml path to procedure element.
        /// </summary>
        public const string ELEMENT_PROCEDURE = "procedure";
        /// <summary>
        /// Token for xml path to sql element.
        /// </summary>
        public const string ELEMENT_SQL = "sql";
        /// <summary>
        /// Token for xml path to selectKey element.
        /// </summary>
        public const string ELEMENT_SELECTKEY = "selectKey";
        /// <summary>
        /// Token for xml path to include element.
        /// </summary>
        public const string ELEMENT_INCLUDE = "include";

        /// <summary>
        /// Token for xml path to dynamic element.
        /// </summary>
        public const string ELEMENT_DYNAMIC = "dynamic";
        /// <summary>
        /// Token for xml path to isEmpty element.
        /// </summary>
        public const string ELEMENT_ISEMPTY = "isEmpty";
        /// <summary>
        /// Token for xml path to isEqual element.
        /// </summary>
        public const string ELEMENT_ISEQUAL = "isEqual";
        /// <summary>
        /// Token for xml path to isGreaterEqual element.
        /// </summary>
        public const string ELEMENT_ISGREATEREQUAL = "isGreaterEqual";
        /// <summary>
        /// Token for xml path to isGreaterThan element.
        /// </summary>
        public const string ELEMENT_ISGREATERTHAN = "isGreaterThan";
        /// <summary>
        /// Token for xml path to isLessThan element.
        /// </summary>
        public const string ELEMENT_ISLESSTHAN = "isLessThan";
        /// <summary>
        /// Token for xml path to isLessEqual element.
        /// </summary>
        public const string ELEMENT_ISLESSEQUAL = "isLessEqual";
        /// <summary>
        /// Token for xml path to isNotEmpty element.
        /// </summary>
        public const string ELEMENT_ISNOTEMPTY = "isNotEmpty";
        /// <summary>
        /// Token for xml path to isNotEqual element.
        /// </summary>
        public const string ELEMENT_ISNOTEQUAL = "isNotEqual";
        /// <summary>
        /// Token for xml path to isNotNull element.
        /// </summary>
        public const string ELEMENT_ISNOTNULL = "isNotNull";
        /// <summary>
        /// Token for xml path to isNotParameterPresent element.
        /// </summary>
        public const string ELEMENT_ISNOTPARAMETERPRESENT = "isNotParameterPresent";
        /// <summary>
        /// Token for xml path to isNotPropertyAvailable element.
        /// </summary>
        public const string ELEMENT_ISNOTPROPERTYAVAILABLE = "isNotPropertyAvailable";
        /// <summary>
        /// Token for xml path to isNull element.
        /// </summary>
        public const string ELEMENT_ISNULL = "isNull";
        /// <summary>
        /// Token for xml path to isParameterPresent element.
        /// </summary>
        public const string ELEMENT_ISPARAMETERPRESENT = "isParameterPresent";
        /// <summary>
        /// Token for xml path to isPropertyAvailable element.
        /// </summary>
        public const string ELEMENT_ISPROPERTYAVAILABLE = "isPropertyAvailable";
        /// <summary>
        /// Token for xml path to iterate element.
        /// </summary>
        public const string ELEMENT_ITERATE = "iterate";
        /// <summary>
        /// Token for xml path to text element.
        /// </summary>
        public const string ELEMENT_TEXT = "Text";
        /// <summary>
        /// Token for CDATA element.
        /// </summary>
        public const string ELEMENT_CDATA = "CDATA";
        /// <summary>
        /// Token for default element.
        /// </summary>
        public const string ELEMENT_DEFAULT = "default"; 

        #endregion

    }
}
